import request from "@/utils/request";

//风险辨识列表
export const getRiskIdentificationList = ({currentPage,pageSize,data}) => {
    return request({
  
      url: `/riskIdentification/getList?currentPage=${currentPage}&pageSize=${pageSize}`,
      method: "POST",
      data:data
  
    })
  }
//风险辨识事故类型
  export const getetAccidencyList = ({currentPage,pageSize,}) => {
    return request({
  
      url: `/riskIdentification/getAccidencyList?currentPage=${currentPage}&pageSize=${pageSize}`,
      method: "POST",
      data:{}
  
    })
  }
  //风险辨识新增
  export const getriskIdentificationedit = (data) => {
    return request({
  
      url: `/riskIdentification/edit`,
      method: "POST",
      data: data
  
    })
  }


//风险单元列表
  export const getriskUnitList = ({currentPage,pageSize,data}) => {
    return request({
  
      url: `/riskUnit/getList?currentPage=${currentPage}&pageSize=${pageSize}`,
      method: "POST",
      data:data
  
    })
  }

//风险单元类型

export const getRiskUnitTypeList = ({mineId}) => {
    return request({
  
      url: `/riskUnit/getRiskUnitTypeList?mineId=${mineId}`,
      method: "POST",
      data: {
       
      }
  
    })
  }

//风险单元编辑
  export const getriskUnitedit = (data) => {
    return request({
  
      url: `/riskUnit/edit`,
      method: "POST",
      data: data
  
    })
  }



  //风险上级单元类型

export const getRiskUnitTreeList = (data) => {
    return request({
  
      url: `/riskUnit/getRiskUnitTree`,
      method: "POST",
      data: data
  
    })
  }


  //风险单元删除
  export const riskUnitDelete = ({id}) => {
    return request({
  
      url: `/riskUnit/delete`,
      method: "POST",
      data:{
          id:id
      }
  
    })
  }

 //风险辨识删除
  export const riskIdentificationDelete = ({id}) => {
    return request({
  
      url: `/riskIdentification/delete`,
      method: "POST",
      data:{
          id:id
      }
  
    })
  }
 //风险辨识编辑
 export const riskIdentificationedit = (data) => {
    return request({
  
      url: `/riskIdentification/edit`,
      method: "POST",
      data: data
  
    })
  }


//风险管控列表

export const getriskControlMeasuresList = ({currentPage,pageSize,riskId}) => {
    return request({
  
      url: `/riskControlMeasures/getList?currentPage=${currentPage}&pageSize=${pageSize}`,
      method: "POST",
      data: {
        riskId:riskId
      }
  
    })
  }




//风险管控部门
  export const getMeasureTypeList = (data) => {
    return request({
  
      url: `/organization/getTree`,
      method: "POST",
      data:data
  
    })
  }




//风险管控措施
export const getMeasureTypeListbase = (data) => {
    return request({
  
      url: `/riskControlMeasures/getMeasureTypeList`,
      method: "POST",
      data:data
  
    })
  }

//风险管控措施新增
export const riskControlMeasuresedit = (data) => {
    return request({
  
      url: `/riskControlMeasures/edit`,
      method: "POST",
      data: data
  
    })
  }


//风险管控贼人人
  export const getemployeeInfoList = ({currentPage,pageSize}) => {
    return request({
  
      url: `/employeeInfo/getList?currentPage=${currentPage}&pageSize=${pageSize}`,
      method: "POST",
      data: {
        
      }
  
    })
  }

  
//风险删除
  export const riskControlMeasuresDelete = ({id}) => {
    return request({
  
      url: `/riskControlMeasures/delete`,
      method: "POST",
      data:{
          id:id
      }
  
    })
  }

//隐患排查分类树形图

export const riskCtegory = ()=>{
  return request({
    url: `/riskCategory/getTree`,
      method: "GET",
      data:{
         
      }
  })
}


//隐患分类带id查询
export const riskCtegorygetById = (id)=>{
  return request({
    url: `/riskCategory/getById/${id}`,
      method: "GET",
      data:{
         
      }
  })
}


export const riskCteriskAssessment = (data)=>{
  return request({
    url: `/riskAssessment/edit`,
      method: "POST",
      data:data
  })
}



//风险分布市局地图
export const statisticsTotalriskTotal = ({type,areaCode,mineId})=>{
  return request({
    url: `/statisticsTotal/riskTotal?type=${type}&areaCode=${areaCode}&mineId=${mineId}`,
      method: "POST",
      data:{}
  })
}

export const statisticsurgentTotal = ({type,areaCode,mineId})=>{
  return request({
    url: `/statisticsTotal/urgentTotal?type=${type}&areaCode=${areaCode}&mineId=${mineId}`,
      method: "POST",
      data:{}
  })
}


export const riskExcludeNewdelete = ({id}) => {
  return request({

    url: `/riskExcludeNew/delete/${id}`,
    method: "GET",
    data:{
       
    }

  })
}







































  